package com.yingdong.message;

import com.yingdong.db.User;
import com.yingdong.opcode.ServerOpcode;
import com.yingdong.sceneserver.inner.message.SendBaseMessage;

public class UserInfoMessage extends SendBaseMessage {

	public UserInfoMessage(User usr) {
		super(ServerOpcode.USER_INFO);
		if (usr != null) {
			writeInt(usr.getId());
			writeString(usr.getUserName());
			writeByte(usr.getGender());
		} else {
			writeInt(0);
		}
	}

}
